package per.turtle.websocket.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * WebSocket配置处理器
 *
 * @author yuj
 */
@Configuration
public class WebSocketConfig {

    /**
     * ServerEndpointExporter 会自动注册 @ServerEndpoint 注解声明的 websocket endpoint
     *
     * @return ServerEndpointExporter
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }

}
